package cn.tedu.charging.cost.dao.repository.impl;

import cn.tedu.charging.cost.dao.mapper.CostRuleMapper;
import cn.tedu.charging.cost.dao.repository.CostRuleRepository;
import cn.tedu.charging.cost.pojo.po.CostRulePO;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @Author: Miyako
 * @Date: 2024-10-23-11:28
 * @Description:
 */
@Repository
public class CostRuleRepositoryImpl implements CostRuleRepository {
    @Autowired
    CostRuleMapper costRuleMapper;
    @Override
    public List<CostRulePO> getCostRules(Integer stationId,Integer gunType) {
        QueryWrapper queryWrapper = new QueryWrapper<>();
        queryWrapper.eq("station_id",stationId);
        queryWrapper.eq("gun_type",gunType);
        List<CostRulePO> costRulePOListc = costRuleMapper.selectList(queryWrapper);
        return costRulePOListc;
    }
}
